/**
 *
 * @description:
 * @author:junyong.hong
 * @createTime:2017.10.30
 * @version:1.0.0.0
 * @history:
 *    1、
 *    2、
 *
 */
define([
    'angularAMD',
    'config'
], function (angularAMD, app) {
    app.provider('homeRouter', function ($stateProvider) {
        this.$get = function () {

            var service, 
                CURRENT_PATH = 'components/module/home/test/';

            service = {
                'setRouter': function () {
                    $stateProvider
                        .state('index.home.demo1', angularAMD.route({
                            url: '/demo1',
                            templateUrl: CURRENT_PATH + 'demo1/demo1.html',
                            controllerAs:'demo1VM',
                            controllerUrl: CURRENT_PATH + 'demo1/demo1.controller.js',
                            controller: 'demo1.controller'
                        }))
                        .state('index.home.demo2', angularAMD.route({
                            url: '/demo2',
                            templateUrl: CURRENT_PATH + 'demo2/demo2.html',
                            controllerAs:'demo2VM',
                            controllerUrl: CURRENT_PATH + 'demo2/demo2.controller.js',
                            controller: 'demo2.controller'
                        }))
                }
            }

            return service;
        };
    }).run(function (homeRouter) {
        homeRouter.setRouter();
    });
});